.text-generation-container {
  width: 1550px;
  margin: 0 auto;
  padding: 20px;
  height: 110vh;
  background: linear-gradient(135deg, #667eea 50%, #764ba2 100%);
  position: relative;
}

.btn-animate {
  position: absolute;
  top: 40px;
  left: 40px;
  z-index: 1000;
  cursor: pointer;
}

.btn-animate__surround {
  background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
  color: white;
  padding: 12px 20px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
  transition: all 0.3s ease;
  border: none;
}

.btn-animate__surround:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
  background: linear-gradient(135deg, #4ecdc4, #ff6b6b);
}

.btn-animate__surround span {
  display: inline-block;
  transition: transform 0.3s ease;
}

.btn-animate__surround:hover span {
  transform: scale(1.05);
}

.text-generation-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%),
              linear-gradient(-45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%),
              linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.1) 75%),
              linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.1) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

.header h1 {
  font-size: 2.8rem;
  color: white;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  background: linear-gradient(45deg, #fff, #f0f8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.content-wrapper {
  display: grid;
  gap: 30px;
  margin-left: -40px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, #FF6B6B, #4ECDC4, #45B7D1) 1;
}

.section-title .icon {
  font-size: 1.5rem;
}

.section-title h3 {
  margin: 0;
  color: #2c3e50;
}

.input-section, .result-section, .history-section {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
  backdrop-filter: blur(10px);
  padding: 30px;
  width: 1200px;
  min-height: 400px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin: 0 auto;
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.input-section:hover, .result-section:hover, .history-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #34495e;
}

.prompt-textarea {
  width: 100%;
  min-height: 120px;
  padding: 15px;
  border: 2px solid transparent;
  border-radius: 12px;
  font-size: 16px;
  resize: vertical;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.prompt-textarea:focus {
  outline: none;
  border-color: #FF6B6B;
  box-shadow: 0 4px 20px rgba(255, 107, 107, 0.2);
  transform: translateY(-1px);
}

.char-count {
  text-align: right;
  font-size: 0.9rem;
  color: #7f8c8d;
  margin-top: 5px;
}

.parameters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.param-item {
  display: flex;
  flex-direction: column;
}

.param-item label {
  margin-bottom: 8px;
  font-weight: 600;
  color: #34495e;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #ddd;
  outline: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
  transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.6);
}

.slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
  transition: all 0.3s ease;
  border: none;
}

.slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.6);
}

.value {
  min-width: 40px;
  text-align: center;
  font-weight: bold;
  color: #3498db;
}

.temperature-hint {
  font-size: 0.9rem;
  color: #7f8c8d;
  margin-left: 10px;
}

.action-buttons {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.generate-btn, .clear-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 600;
}

.generate-btn {
  background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 50%, #45B7D1 100%);
  color: white;
  flex: 1;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.generate-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.generate-btn:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
  transform: none;
}

.clear-btn {
  background: linear-gradient(135deg, #A8E6CF 0%, #FFD3A5 100%);
  color: #2c3e50;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(168, 230, 207, 0.3);
}

.clear-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #FFD3A5 0%, #A8E6CF 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(168, 230, 207, 0.4);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #ffffff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 添加浮动动画 */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.text-generation-container > * {
  animation: float 6s ease-in-out infinite;
}

.text-generation-container > *:nth-child(2) {
  animation-delay: -2s;
}

.text-generation-container > *:nth-child(3) {
  animation-delay: -4s;
}

.result-content {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  padding: 25px;
  border-radius: 16px;
  margin-top: 15px;
  box-shadow: 0 4px 15px rgba(168, 237, 234, 0.3);
}

.result-stats {
  display: flex;
  gap: 30px;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.stat-label {
  color: #7f8c8d;
}

.stat-value {
  color: #3498db;
  font-weight: bold;
}

.result-text {
  margin-top: 15px;
}

.text-label {
  font-weight: 600;
  margin-bottom: 10px;
  color: #2c3e50;
}

.generated-text {
  line-height: 1.8;
  color: #2c3e50;
  white-space: pre-wrap;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 20px;
  border-radius: 12px;
  border-left: 5px solid #FF6B6B;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  font-size: 1.1rem;
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #FF6B6B #f5f7fa;
}

  .generated-text::-webkit-scrollbar {
  width: 8px;
}

  .generated-text::-webkit-scrollbar-track {
  background: #f5f7fa;
  border-radius: 4px;
}

  .generated-text::-webkit-scrollbar-thumb {
  background: #FF6B6B;
  border-radius: 4px;
}

  .generated-text::-webkit-scrollbar-thumb:hover {
  background: #ee5253;
}

.error-message {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
  border-radius: 12px;
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 154, 158, 0.3);
  font-weight: 500;
}

.error-icon {
  font-size: 2rem;
}

.error-content h4 {
  margin: 0 0 5px 0;
}

.error-content p {
  margin: 0;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.copy-btn, .clear-history-btn {
  padding: 8px 16px;
  background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
  color: #2c3e50;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(132, 250, 176, 0.3);
  transition: all 0.3s ease;
}

.copy-btn:hover, .clear-history-btn:hover {
  background: linear-gradient(135deg, #8fd3f4 0%, #84fab0 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(132, 250, 176, 0.4);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.history-item {
  padding: 15px;
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  border-radius: 12px;
  border-left: 4px solid #ff6b6b;
  box-shadow: 0 2px 8px rgba(252, 182, 159, 0.3);
  transition: transform 0.3s ease;
}

.history-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(252, 182, 159, 0.4);
}

.history-prompt {
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: #2c3e50;
}

.history-result {
  font-size: 0.85rem;
  color: #7f8c8d;
  margin-bottom: 8px;
}

.history-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #95a5a6;
}

.history-meta button {
  padding: 4px 8px;
  background: #95a5a6;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.7rem;
}

.history-meta button:hover {
  background: #7f8c8d;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .text-generation-container {
    padding: 15px;
  }
  
  .header h1 {
    font-size: 2rem;
  }
  
  .parameters-grid {
    grid-template-columns: 1fr;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .result-stats {
    flex-direction: column;
    gap: 10px;
  }
}